<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="Content-Language" content="zh-cn">
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <meta name="renderer" content="webkit">
    <title th:text="${order.siteName}+' - 支付方式选择'"></title>
    <meta name="keywords" th:content="${config.keywords}">
    <meta name="description" th:content="${config.decText}">
    <meta name="apple-mobile-web-app-capable" content="no">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="format-detection" content="telephone=no,email=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link href="/static/css/codepay/wechat_pay.css" rel="stylesheet" media="screen">
    <script src="/static/js/jquery-1.11.3.min.js"></script>
    <style type="text/css">
        img.logo {
            width: 14px;
            height: 14px;
            margin: 0 5px 0 3px;
        }

        li {
            float: left;
            margin-left: 16px;
            margin-bottom: 35px;
        }
    </style>
</head>
<body>
<h1 class="mod-title">
    <span class="text" th:text="${order.siteName}"></span>
</h1>
<div class="mod-ct">
    <div class="order">
    </div>
    <div class="amount" id="money" th:text="'￥'+${order.price}"></div>
    <div class="qrcode-img-wrapper" data-role="qrPayImgWrapper">
        <ul style="text-align: center; display: inline-block;padding-top: 30px;">
            <center>
                <th:block th:if="${user.payAlipay != -1}">
                    <li>
                        <a href="javascript:void(0);" onclick="to_pay(2,'[(${order.id})]','[(${ret})]')">
                            <label>
                                <img src="/static/images/selectpay/alipay.png" title="支付宝" width="80" height="80">
                            </label>
                        </a>
                    </li>
                </th:block>
                <th:block th:if="${user.payQqpay != -1}">
                    <li>
                        <a href="javascript:void(0);" onclick="to_pay(3,'[(${order.id})]','[(${ret})]')">
                            <label>
                                <img src="/static/images/selectpay/qqpay.png" title="QQ钱包" width="80" height="80">
                            </label>
                        </a>
                    </li>
                </th:block>
                <th:block th:if="${user.payWxpay != -1}">
                    <li>
                        <a href="javascript:void(0);" onclick="to_pay(1,'[(${order.id})]','[(${ret})]')">
                            <label>
                                <img src="/static/images/selectpay/wxpay.png" title="微信支付" width="80" height="80">
                            </label>
                        </a>
                    </li>
                </th:block>
            </center>
        </ul>
    </div>
    <div class="tip">
        <div class="tip-text">
            <p>请选择一种支付方式完成支付</p>
        </div>
    </div>
    <div class="detail" id="orderDetail">
        <dl class="detail-ct" id="desc" style="display: none;">
            <dt>商家</dt>
            <dd th:text="${order.siteName}"></dd>
            <dt>购买物品</dt>
            <dd th:text="${order.title}"></dd>
            <dt>云端单号</dt>
            <dd th:text="${order.outOrderId}"></dd>
            <dt>创建时间</dt>
            <dd th:text="${#dates.format(order.createTime,'yyyy-MM-dd HH:mm:ss')}"></dd>
        </dl>
        <a href="javascript:void(0)" class="arrow"><i class="ico-arrow"></i></a>
    </div>
    <div class="tip-text">
    </div>
</div>
<div class="foot">
    <div class="inner">
        <p>请选择一种支付方式完成支付</p>
    </div>
</div>
<script>

    $('#orderDetail .arrow').click(function (event) {
        if ($('#orderDetail').hasClass('detail-open')) {
            $('#orderDetail .detail-ct').slideUp(500, function () {
                $('#orderDetail').removeClass('detail-open');
            });
        } else {
            $('#orderDetail .detail-ct').slideDown(500, function () {
                $('#orderDetail').addClass('detail-open');
            });
        }
    });

    function to_pay(type, id, ret) {
        window.location = "/payment/repay?id=" + id + "&type=" + type + "&ret=" + ret + "&spm=" + new Date().getTime();
    }

</script>
</body>
</html>



